Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-es2015-function-name

Package Overview
Dependencies
Maintainers
6
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-es2015-function-name

Apply ES2015 function.name semantics to all functions

  • 6.24.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created

What is babel-plugin-transform-es2015-function-name?

The babel-plugin-transform-es2015-function-name package is a Babel plugin that automatically assigns function names to anonymous functions. This can be particularly useful for debugging purposes, as it makes stack traces more informative by providing function names.

What are babel-plugin-transform-es2015-function-name's main functionalities?

Assigning names to anonymous functions

This feature automatically assigns a name to an anonymous function based on the variable it is assigned to. This makes debugging easier by providing more informative stack traces.

const myFunc = function() {}; // Transformed to: const myFunc = function myFunc() {};

Assigning names to object methods

This feature assigns names to anonymous functions that are used as object methods. This helps in identifying the method in stack traces.

const obj = { method: function() {} }; // Transformed to: const obj = { method: function method() {} };

Assigning names to class methods

This feature ensures that class methods have names, which can be useful for debugging and stack traces.

class MyClass { myMethod() {} } // Transformed to: class MyClass { myMethod() {} }

Other packages similar to babel-plugin-transform-es2015-function-name

Keywords

FAQs

Package last updated on 07 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc